home *** CD-ROM | disk | FTP | other *** search
/ Gigarom 1 / Gigarom Macintosh Archives (Quantum Leap)(CDRM1080320)(1993).iso / FILES / HYP / C-D / DartmouthXCMDs.cpt / Dartmouth XCMDs Vol 1&2 / card_5770.txt < prev    next >
Text File  |  1989-02-26  |  2KB  |  53 lines

  1. -- card: 5770 from stack: in
  2. -- bmap block id: 0
  3. -- flags: 0000
  4. -- background id: 3241
  5. -- name: 
  6.  
  7.  
  8. -- part 1 (button)
  9. -- low flags: 00
  10. -- high flags: A003
  11. -- rect: left=83 top=300 right=322 bottom=183
  12. -- title width / last selected line: 0
  13. -- icon id / first selected line: 0 / 0
  14. -- text alignment: 1
  15. -- font id: 0
  16. -- text size: 12
  17. -- style flags: 0
  18. -- line height: 16
  19. -- part name: PICTFileToRes
  20. ----- HyperTalk script -----
  21. on mouseUp
  22.   put PICTFileToRes
  23. end mouseUp
  24.  
  25.  
  26.  
  27. -- part contents for background part 16
  28. ----- text -----
  29. PICTFILETORES version 1.0
  30. Kevin Calhoun
  31.  
  32. PICTFileToRes creates a PICT resource from a PICT file and copies it into the current stack.  
  33. You can tell ClipToPICT what ID number you want the PICT resource to have, or you can let it select an unused number for you.  If you choose a number that belongs to another PICT resource currently contained in your stack, the new picture will overwrite the old one.
  34.  
  35. PICTFileToRes allows the user to choose the PICT file to copy from from a standard file dialog box.
  36.  
  37. INVOKING PICTFILETORES
  38.  
  39. get PICTFileToRes(pictID,pictName)
  40.  
  41. result:  resourceID
  42.  
  43. Both parameters are optional.  If you don't pass a value for pictID, PICTFileToRes will find an ID for the PICT resource that's not currently in use.  If you don't pass a value for pictName, the PICT resource will be unnamed.  If you pass a value for pictID or pictName that's already in use by another PICT resource in the current stack, the old PICT will be overwritten.
  44.  
  45. If an error occurs, PICTFileToRes will return an error message.  Word 1 of this message will be "Error."
  46.  
  47. EXAMPLES
  48.  
  49. put PICTFileToRes(0,"The Little Engine That Could") into pictNumber
  50. get PICTFileToRes
  51.  
  52. REVISION HISTORY
  53. 1.0 -- 4/22/88